package com.elinkway.infinitemovies.bean;

import com.lvideo.http.bean.LVideoBaseBean;

import java.util.List;

/**
 * Created by huangxiaojian on 2017/8/25.
 *
 */

public class TtAdBean implements LVideoBaseBean{

    private static final long serialVersionUID = 3231329776530791123L;

    public String request_id;
    public Ads ads;
    public String processing_time_ms; //从收到请求到返回响应所用的时间

    /**
     *
     * ERROR_CODE_OK = 20000 # 成功
     * ERROR_CODE_NO_AD = 20001 # 没有广告
     * ERROR_CODE_CONTENT_TYPE = 40000 # http conent_type 错误
     * ERROR_CODE_REQUEST_PB_ERROR = 40001 # http request pb 错误
     * ERROR_CODE_APP_EMPTY = 40002
     * ERROR_CODE_WAP_EMPTY = 40003
     * ERROR_CODE_ADSLOT_EMPTY = 40004
     * ERROR_CODE_ADSLOT_SIZE_EMPTY = 40005
     * ERROR_CODE_ADSLOT_ID_ERROR = 40006
     * ERROR_CODE_ADCOUNT_ERROR = 40007
     * ERROR_CODE_SYS_ERROR = 50001 # 服务器错误
     * ERROR_CODE_SHOW_EVENT_ERROR = 60001 # show event 处理错误
     * ERROR_CODE_CLICK_EVENT_ERROR = 60002 # click event 处理错误
     */
    public String status_code;
    public String expiration_time; //广告过期时间戳

    public static class Ads implements LVideoBaseBean{

        private static final long serialVersionUID = -4097594957251440828L;

        public String ad_id; //创意id
        public MaterialMeta creative; //广告物料
        public String price; //出价
    }

    public static class MaterialMeta implements LVideoBaseBean {

        private static final long serialVersionUID = 5775768893014188423L;
        public int creative_type; //该广告的创意类型   文字=1;静态图片=2;图文=6
        public String interaction_type; //该广告支持的交互类型  文字=1;静态图片=2;图文=6
        public Image image;
        public String target_url; //落地页url
        public String download_url; //下载应用url
        public String title; //广告标题
        public String description; //广告描述
        public String source; //落地页来源
        public String app_name; //针对应用下载类广告
        public String package_name; //包名
        public List win_notice_url; //获取通知的url列表
        public List show_url; //展现监测url列表
        public List click_url; //点击监测url列表
        public String ext; //扩展字段
        public int image_mode; //素材模式 小图=2;大图=3;组图=4
        public List<Image> image_list;  //多图
        public String phone_num; //电话拨打广告，号码
        public String button_text; // 附加创意按钮上的名称，如立即下载、马上拨打、现在申请等
        public String icon; //创意中的 icon 的 url
    }

    public static class Image implements LVideoBaseBean {

        private static final long serialVersionUID = 628981215689107053L;

        public String url;  //图片地址
        public int width; //图片宽度
        public int height; //图片高度
    }

}
